package com.zbkj.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户商品所获金币记录表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Accessors(chain = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "用户商品所获金币记录表")
@TableName(value = "eb_user_integral_gold_coin_record")
@Table(value = "eb_user_integral_gold_coin_record")
public class EbUserIntegralGoldCoinRecordEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录id
     */
    @Schema(description = "记录id")
    @Id(keyType = KeyType.Auto)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户uid
     */
    @Schema(description = "用户uid")
    @Column(value = "uid")
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 关联id-orderNo,(sign,system默认为0）
     */
    @Schema(description = "关联id-orderNo,(sign,system默认为0）")
    @Column(value = "link_id")
    @TableField(value = "link_id")
    private String linkId;

    /**
     * 关联类型（order,sign,system）
     */
    @Schema(description = "关联类型（order,sign,system）")
    @Column(value = "link_type")
    @TableField(value = "link_type")
    private String linkType;

    /**
     * 类型：1-增加，2-扣减
     */
    @Schema(description = "类型：1-增加，2-扣减")
    @Column(value = "type")
    @TableField(value = "type")
    private Integer type;

    /**
     * 标题
     */
    @Schema(description = "标题")
    @Column(value = "title")
    @TableField(value = "title")
    private String title;

    /**
     * 积分
     */
    @Schema(description = "积分")
    @Column(value = "integral")
    @TableField(value = "integral")
    private BigDecimal integral;

    /**
     * 剩余
     */
    @Schema(description = "剩余")
    @Column(value = "balance")
    @TableField(value = "balance")
    private Integer balance;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @Column(value = "mark")
    @TableField(value = "mark")
    private String mark;

    /**
     * 状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款）
     */
    @Schema(description = "状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款）")
    @Column(value = "status")
    @TableField(value = "status")
    private Integer status;

    /**
     * 冻结期时间（天）
     */
    @Schema(description = "冻结期时间（天）")
    @Column(value = "frozen_time")
    @TableField(value = "frozen_time")
    private Integer frozenTime;

    /**
     * 解冻时间
     */
    @Schema(description = "解冻时间")
    @Column(value = "thaw_time")
    @TableField(value = "thaw_time")
    private Long thawTime;

    /**
     * 添加时间
     */
    @Schema(description = "添加时间")
    @Column(value = "create_time")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(value = "update_time")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;


}
